﻿using System;

namespace OnlineJudge
{
    /// <summary>
    /// 默认TCP调用验证函数
    /// </summary>
    public sealed class VerifyMethod : fastCSharp.code.cSharp.tcpBase.ITcpClientVerifyMethod<OnlineJudge.Server.tcpClient>
        , fastCSharp.code.cSharp.tcpBase.ITcpClientVerifyMethod<OnlineJudge.RouterServer.tcpClient>
    {
        /// <summary>
        /// TCP注册服务客户端验证
        /// </summary>
        /// <param name="client">TCP调用客户端</param>
        /// <returns>是否通过验证</returns>
        public bool Verify(OnlineJudge.Server.tcpClient client)
        {
            return fastCSharp.net.tcp.timeVerifyServer.Verify(client, client.TcpCommandClient.Attribute.VerifyString);
        }
        /// <summary>
        /// TCP注册服务客户端验证
        /// </summary>
        /// <param name="client">TCP调用客户端</param>
        /// <returns>是否通过验证</returns>
        public bool Verify(OnlineJudge.RouterServer.tcpClient client)
        {
            return fastCSharp.net.tcp.timeVerifyServer.Verify(client, client.TcpCommandClient.Attribute.VerifyString);
        }
    }
}
